package com.sw.bbs.board.dao.media;

import com.sw.bbs.board.pojo.Tag;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface TagMapper {
    int deleteByPrimaryKey(Integer tagId);

    int insert(Tag record);

    int insertSelective(Tag record);

    Tag selectByPrimaryKey(Integer tagId);

    int updateByPrimaryKeySelective(Tag record);

    int updateByPrimaryKey(Tag record);

    /**
     * 热门标签，search_num排序
     * @return
     */
    List<Tag> queryHotList();
    /**
     * 根据关键字查标签
     */
    Tag queryTagByKeyword(@Param("keyword") String keyword);
}